package com.shortlink.auth.remote;

import com.shortlink.common.base.Result;
import com.shortlink.common.user.UserInfoDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户远程调用服务
 *
 * @author wp
 */
@FeignClient(
        name = "${shortlink-aggregation.name:shortlink-admin}",
        path = "/${shortlink-aggregation.name:shortlink-admin}",
        contextId = "user"
)
public interface UserRemoteService {
    /**
     * 登录
     */
    @PostMapping("/api/user/login")
    Result<UserInfoDTO> login(@RequestParam("username") String username, @RequestParam("password") String password);
}